'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {
    const { ctx } = this;
    try {
      ctx.body = await ctx.service.token.getToken();
    } catch (e) {
      ctx.body = e.message;
    }
  }
}

module.exports = HomeController;
